﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WangMiEntity;
using TaoBaoServices;
using WangMiEntity.Download.SubUser;

namespace DownloadTaobaoAPI
{
    public class WangWangDownload : BaseDownload, IDownload, IDataOperate
    {
        public void SyncData()
        {

        }

        public void SyncData(string sessionKey)
        {
            ChatpeerEntity chatpeerEntity = new ChatpeerEntity();
            var chatpeers = WangWangAPI.GetWangwangEserviceChatpeersGetResponse(DateTime.Now, DateTime.Now, "", "");

            chatpeers.Chatpeers.ForEach(item =>
            {
                chatpeerEntity.Date = Convert.ToDateTime(item.Date);
                chatpeerEntity.SubId = "subnick";
                chatpeerEntity.BuyerId = item.Uid;

                this.WangMiDatabase.Insert(chatpeerEntity);
            });
        }

        public void Insert()
        {
            throw new NotImplementedException();
        }

        public void Update()
        {
            throw new NotImplementedException();
        }

        public void Delete()
        {
            throw new NotImplementedException();
        }



    }
}
